/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package my.SimulatorGUI1;

/**
 *
 * @author jda99448
 */
public class Controller implements Handler{
    Timer resetTimer;
    Timer clockTickTimer;
    SimulatorGUI1 theGUI;
    
    public Controller(){
        init();
        theGUI = new SimulatorGUI1();        
    }
    
    public void init(){
        resetTimer = new Timer("RESET", 720, 1, this);
        clockTickTimer = new Timer("TICK", 1, 720, this);
    }
    
   
    public void handle(String message){
        System.out.println("Recieved message: \""+message+"\"");
        
        if(message.equals("RESET")){
            resetTimer.init("RESET", 720, 1, this);
            clockTickTimer.init("TICK", 1, 720, this);
            
        }
        if(message.equals("TICK")){
            // TODO increment clock
        }
    }
    
     public static void main (String args[]){
        Controller myController = new Controller();
        myController.theGUI.setVisible(true);        
    }
    

}
